package cn.jingyuan.fox.user.aop;

import cn.jingyuan.fox.module.web.aop.feign.FeignClientLogAbstractAspect;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * Feign Client 日志切面。
 * <p>
 * <a href="https://www.jianshu.com/p/018c8cf70a59">参考</a>
 */
@Component
@Aspect
@Slf4j
public class FeignClientLogAspect extends FeignClientLogAbstractAspect {

    @Pointcut("execution(public * cn.jingyuan.fox.user.rpc..*FeignClient.*.*(..))")
    public void pointcut() {}

    @Around(value = "pointcut()")
    @Override
    public Object exceptionAdvice(ProceedingJoinPoint joinPoint) {
        return super.exceptionAdvice(joinPoint);
    }

}
